import React,{propTypes} from "react";
import {Table} from 'antd';
import Util from "../../../../util/Util"
import ProductionScheduleServerMutation from '../../mutation/productionScheduling/ProductionScheduleServerMutation';

export default class Logic_Table extends React.Component {
    static defaultProps = {

    };

    static propTypes = {

    };

    constructor(props) {
        super(props);
        this.state = {}
    };

    columns = [
        {
        title: '订单编号',
        dataIndex: 'orderId',
        key: 'orderId',
    },
        {
        title: '款号',
        dataIndex: 'styleNo',
        key: 'styleNo',
    },
        {
        title: '开始时间',
        dataIndex: 'startDate',
        key: 'startDate',
        render: (text, record) =>{
            return(
                <span>{Util.dateFormat(record.startDate)}</span>
            )
        }
    },
        {
        title: '结束时间',
        dataIndex: 'endDate',
        key: 'endDate',
        render: (text, record) => {
            return (
                <span>{Util.dateFormat(record.endDate)}</span>
            )
        }
    },
        {
        title: '货期',
        dataIndex: 'deliverDate',
        key: 'deliverDate',
    },
        {
        title: '生产天数',
        dataIndex: 'productionDays',
        key: 'productionDays',
    },
        {
        title: '剩余天数',
        dataIndex: 'surplusDays',
        key: 'surplusDays',
    },
        {
        title: '合同数量',
        dataIndex: 'quantity',
        key: 'quantity',
    },
        {
        title: '裁剪数量',
        dataIndex: 'cutCount',
        key: 'cutCount',
    },
        {
            title: '累计缝制数量',
            dataIndex: 'complete',
            key: 'complete',
    },
        {
            title: '缝制比例',
            dataIndex: 'ratio',
            key: 'ratio',
    },
    ];

    render() {
        const props = Object.assign({},this.props);
        return (
            <Table
                columns={this.columns}
                dataSource={props.dataSource}
                //bordered={true}
                rowKey={(record)=>record.psId}
                className="order_table"
                pagination={false}
            />
        )
    }
}